package cn.zhang.violet.config

import java.util.Properties

import com.typesafe.config.{Config, ConfigFactory}

object ConfigHandler {
  //默认获取路径
  private val applicationFile : Config = ConfigFactory.load()
  //文件数据路径
  val parquetFilePath: String = applicationFile.getString("parquet.file.path")
  //字典数据路径
  val appdictFilePath: String = applicationFile.getString("appdict.file.path")
  //mysql
   val driverClass: String = applicationFile.getString("jdbc.driverClass")
   val url: String = applicationFile.getString("jdbc.url")
   val username: String = applicationFile.getString("jdbc.user")
   val password: String = applicationFile.getString("jdbc.password")
   //mysql 用户名以及密码
  val props = new Properties()
  props.setProperty("driver",driverClass)
  props.setProperty("user",username)
  props.setProperty("password",password)

  // 解析redis host
  val jedisHost: String = applicationFile.getString("redis.host")
  // 解析redis port
  val jedisPort: Int = applicationFile.getInt("redis.port")




}
